import 'package:get/get.dart';
import 'package:hc_bot_pro/common/routes.dart';
import 'package:hc_bot_pro/common/service/sdk_service.dart';
import 'package:hc_bot_pro/common/service/therapy_service.dart';

class SplashController extends GetxController {
  SplashController();

  _initData() async {
    await Future.delayed(2.seconds);
    await Get.find<SDKService>().login();
    await Get.find<TherapyService>().refreshTherapyList();
    Get.offNamed(Routes.kChat);
  }

  void onTap() {}

  // @override
  // void onInit() {
  //   super.onInit();
  // }

  @override
  void onReady() {
    super.onReady();
    _initData();
  }

  // @override
  // void onClose() {
  //   super.onClose();
  // }
}
